'use strict'

//角色战斗属性
class FightAttri {
    constructor(opts) {
        opts = opts || {}
        this.name = opts.name || '' //名字
        this.hp = opts.hp || 0 //生命
        this.maxHp = opts.maxHp || 0 //最大生命
        this.mp = opts.mp || 0 //魔法
        this.maxMp = opts.maxMp || 0 //最大魔法
        this.recover =  opts.recover || 0 //生命恢复
        this.attack = opts.attack || 0 //攻击力
        this.defend = opts.defend || 0 //防御
        this.critRate = opts.critRate || 0 //暴击概率
        this.critHurt = opts.critHurt || 0 //暴击伤害
        this.skillRate = opts.skillRate || 0 //技能释放率
        this.skillHurtPer = opts.skillHurtPer || 0 //技能伤害率
        this.ignoreDefend = opts.ignoreDefend || 0 //无视防御力
        this.str = opts.str || 0 //力量:提升基础攻击力和少量生命
        this.con = opts.con || 0 //体质:提升防御和生命
        this.agile = opts.agile || 0 //意志:提升物理技能伤害
        this.wisdom = opts.wisdom || 0 //智慧:提升幸运和少量生命
        this.lucky = opts.lucky || 0 //幸运
        this.skills = opts.skills || []
        this.attackSkill = opts.attackSkill || [] //攻击触发技能
        this.defendSkill = opts.defendSkill || [] //防御触发技能
        this.buff = 0 //0初始状态
        this.debuff = 0 //0初始状态 1 眩晕
        this.lvl = opts.lvl || 1 //等级
        this.maxStamina = opts.maxStamina || 0 //最大体力
        this.money = opts.money || 0 //银币掉率
    }
}

module.exports = FightAttri
